package com.example.Lezedata.ui.activity.home;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.example.Lezedata.R;
import com.example.Lezedata.ui.activity.goods.GoodsNameView;

import bid.Bid;

public class WinnersVcCell extends FrameLayout {
    public  Bid.WinPrizeListResponse.WinPrizeItem item;

    private TextView time;
    private ImageView imageView;
    private GoodsNameView goodsNameView;
    private TextView winner;
    private TextView wishCode;
    private TextView bought;

    public static WinnersVcCell newInstance(Context context) {
        WinnersVcCell fragment = (WinnersVcCell) LayoutInflater.from(context).inflate(R.layout.winners_vc_cell,null,false);
        return fragment;
    }

    public WinnersVcCell(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        findView();
    }

    void findView(){
        time = findViewWithTag("time");
        imageView = findViewWithTag("imageView");
        goodsNameView = findViewWithTag("goodsNameView");
        winner = findViewWithTag("winner");
        wishCode = findViewWithTag("wishCode");
        bought = findViewWithTag("bought");
    }

    public void setItem(Bid.WinPrizeListResponse.WinPrizeItem item) {
        this.item = item;
//        time.setText(GBTimeManager.timesYMD_HMS());
    }
}
